package com.heima.article.controller.v1;

import com.heima.article.service.ArticleCollectionService;
import com.heima.model.behavior.dtos.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 熏橙橙
 * @version 1.0
 * @date 2023-08-03 10:58
 */
@RestController
@RequestMapping("/api/v1")
public class ArticleCollectionController {

    @Autowired
    private ArticleCollectionService articleCollectionService;

    /**
     * 收藏文章
     * @param dto
     * @return
     */
    @PostMapping("/collection_behavior")
    public ResponseResult collection_behavior(@RequestBody CollectionBehaviorDto dto){
        return articleCollectionService.collection(dto);
    }
}
